<template>
  <a class="news_item">
    <div class="box-3d">
      <div
        class="cover img"
        style="
          background-image: url(https://www.sckingme.cn/uploads/allimg/20230307/1-23030G14630M2.jpg);
        "
      >
        <div class="brand fill add">
          <img
            src="https://www.sckingme.cn/uploads/images/20210407/2af4d3cd130398db437579b51d436c7e.png"
            alt="西南财经大学"
          />
        </div>
      </div>
      <div class="corner">
        <div class="circle flex-gather">
          <i class="icon icon-xiangyou">31</i>
        </div>
      </div>
    </div>
    <div class="title ell tran2">西南财经大学 - 教育培训/高校</div>
    <p class="text ell">经世济民,孜孜以求</p>
    <div class="line tran2"></div>
  </a>
</template>
<script setup lang="ts">
import { ref, useTemplateRef } from "vue";
const hello = ref("hello world");
</script>
<style lang="scss" scoped>
.news_item {
  width: 20vw;
  .box-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
    position: relative;
    backface-visibility: hidden;
    overflow: hidden;
    cursor: pointer;
    .cover {
      transition: 0.7s cubic-bezier(0.64, 0.6, 0.32, 1.27);
      transform-origin: left center;
      background-size: cover;
      position: relative;

      .brand {
        text-align: center;
        padding: 4rem 0;
        img {
          width: 40%;
          display: inline-block;
        }
      }
    }
    &:hover {
      .cover {
        transform: rotateY(8deg);
      }
      .corner {
        transform: scale(1);
      }
    }
    .corner {
      width: 4.5em;
      max-width: 22%;
      transform-origin: left bottom;
      position: absolute;
      left: -1px;
      transform: scale(0);
      bottom: -1px;
      border-left: 1px solid rgb(255, 255, 255);
      border-bottom: 1px solid rgb(255, 255, 255);
      transition: all 0.7s cubic-bezier(0.64, 0.6, 0.32, 1.27);
      &::before {
        content: "";
        display: block;
        padding-top: 100%;
        background: url(https://www.sckingme.cn/template/pc/skin/index/images/corner.png)
          left bottom / contain no-repeat scroll;
      }
      .circle {
        position: absolute;
        left: 0.3em;
        bottom: 0.3em;
        width: 60%;
        height: 60%;
        background-color: rgb(189, 30, 37);
        color: rgb(255, 255, 255);
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
      }
    }
  }
}
</style>
